<template>
  <headerView  ref="header" systemName="统一身份认证平台"/>
  <div class="app-table">
    <div class="app-body">
      <div class="app-separator">
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/' }">主页</el-breadcrumb-item>
          <el-breadcrumb-item :to="{ path: '/articleList' }"
            ><a>通知公告</a></el-breadcrumb-item
          >
          <el-breadcrumb-item><a>详情</a></el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <el-divider></el-divider>
      <div class="detail">
        <div class="title">{{ article.title }}</div>
        <div class="sub-title">{{ article.publishDate }}</div>

        <div class="content" v-html="article.content"></div>
      </div>
    </div>
  </div>
  <bottomView />
</template>
<script  >
import headerView from "@/components/header.vue";
import bottomView from "@/components/bottom.vue";

import { ElConfigProvider, ElMessageBox, ElMessage } from "element-plus";
import zhCn from "element-plus/lib/locale/lang/zh-cn";

import { httpService } from "@/utils/httpService";
import { Picture as IconPicture } from "@element-plus/icons-vue";
export default {
  name: "ArticleList",
  data() {
    return {
      article: {},
    };
  },
  mounted() {
    // this.$refs.header.systemName = "统一身份认证平台";
    this.$refs.header.homeIndexName = "Index";
    this.getListArticle();
  },

  components: {
    headerView,
    IconPicture,
    ElConfigProvider,
    ElMessageBox,
    ElMessage,
    bottomView,
  },
  setup() {
    return {
      locale: zhCn,
    };
  },
  methods: {
    getListArticle() {
      httpService(
        "/javaApi/baseArticle/queryArticleById/" + this.$route.query.id,
        "",
        "get"
      ).then((data) => {
        this.article = data;
      });
    },
  },
};
</script>

<style >
.detail .title {
  font-size: 20px;
}
.detail td {
  border: 1px solid #dedede;
}
.detail table {
  text-align: center;
  margin: 0 auto;
}
.detail .sub-title {
  font-size: 16px;
  padding: 10px;
  color: #888888;
}
.detail {
  min-height: calc(100vh - 370px);
  text-align: center;
}
.content {
  width: 70%;
  margin: 0 auto;
}

.app-table {
  background: #eff3f5;
  padding: 10px;
}
.app-search {
  margin-left: 10px;
  margin-top: 10px;
}
.app-separator {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 10px;
}
.app-body {
  background: white;
  padding: 20px;
}
.el-table .warning-row {
  --el-table-tr-bg-color: var(--el-color-warning-lighter);
}
.el-table .success-row {
  --el-table-tr-bg-color: var(--el-color-success-lighter);
}
.el-pagination {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 10px;
}
</style>
